﻿@model SmartMoney.WebApp.Models.Transaction

@{
    ViewBag.Title = "Edit";
}

<h2>Edit</h2>

@using (Html.BeginForm()) {
    @Html.AntiForgeryToken()
    @Html.ValidationSummary(true)

    <fieldset>
        <legend>Transaction</legend>

        @Html.HiddenFor(model => model.TransactionId)

        <div class="editor-label">
            @Html.LabelFor(model => model.TransactionTypeId, "TransactionType")
        </div>
        <div class="editor-field">
            @Html.DropDownList("TransactionTypeId", String.Empty)
            @Html.ValidationMessageFor(model => model.TransactionTypeId)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.DebitMoneyAccountId, "MoneyAccount")
        </div>
        <div class="editor-field">
            @Html.DropDownList("DebitMoneyAccountId", String.Empty)
            @Html.ValidationMessageFor(model => model.DebitMoneyAccountId)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.CreditMoneyAccountId, "MoneyAccount1")
        </div>
        <div class="editor-field">
            @Html.DropDownList("CreditMoneyAccountId", String.Empty)
            @Html.ValidationMessageFor(model => model.CreditMoneyAccountId)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.CategoryId, "Category")
        </div>
        <div class="editor-field">
            @Html.DropDownList("CategoryId", String.Empty)
            @Html.ValidationMessageFor(model => model.CategoryId)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Date)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Date)
            @Html.ValidationMessageFor(model => model.Date)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Amount)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Amount)
            @Html.ValidationMessageFor(model => model.Amount)
        </div>

        <p>
            <input type="submit" value="Save" />
        </p>
    </fieldset>
}

<div>
    @Html.ActionLink("Back to List", "Index")
</div>

@section Scripts {
    @Scripts.Render("~/bundles/jqueryval")
}
